<?php

/**
 * @author 
 * @copyright 2008
 */

class string_manipulation {

        /**
         * Get between text
         * 
         * @param type $string
         * String to process
         * @param type $starts
         * Block start
         * @param type $ends
         * Block end
         * @return mixed
         * False if start or end not found, string between if exist
         */
	public function get_between($string, $starts, $ends) {
        $st = strpos($string,$starts)+strlen($starts);
        $en = strpos($string,$ends);
        if ($st==0 || $en==0) return false;
        return substr($string,$st,$en-$st);
}

}

?>